import request from '@/utils/request.js'

// 获取公告列表
export const noticeListService = (params) => {
    return request.get('/Announcement/getAll', { params })
}

// 创建公告
export const createNoticeService = (data) => {
    return request.post('/Announcement/create', data)
}

// 更新公告
export const updateNoticeService = (data) => {
    return request.post('/Announcement/update', data)
}

// 删除公告
export const deleteNoticeService = (id) => {
    return request.delete('/Announcement/delete?id=' + id)
}
//分页查询
export const AnnouncementListService = (params)=>{
    return request.get('/Announcement/selectPage',{params})
}
//根据标题查询
export const selectByTitleService = (title)=>{
    return request.get('/Announcement/findByTitle?title='+title)
}
//批量删除
export const batchDeleteAnnouncementService = (ids)=>{
    return request.delete('/Announcement/delete/batch',{data:ids})
}